﻿<%@ Page Language="C#" MasterPageFile="~/TeamManager.Master" AutoEventWireup="true" CodeBehind="Cars.aspx.cs" Inherits="NWS.Games.Cars" Title="Машины" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">
	<asp:ScriptManager ID="ScriptManager1" runat="server">
	</asp:ScriptManager>
	<telerik:RadAjaxPanel ID="RadAjaxPanel" runat="server" height="100%" 
		width="100%">
		<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" 
			DataSourceID="CarDS" GridLines="None" Skin="Office2007" 
			AllowAutomaticDeletes="True" AllowAutomaticUpdates="True" 
			onitemdeleted="RadGrid1_ItemDeleted" oniteminserted="RadGrid1_ItemInserted" 
			onitemupdated="RadGrid_ItemUpdated" AllowAutomaticInserts="True">
			<HeaderContextMenu>
				<CollapseAnimation Duration="200" Type="OutQuint" />
			</HeaderContextMenu>
			<MasterTableView DataSourceID="CarDS" 
				CommandItemDisplay="TopAndBottom" DataKeyNames="ID">
				<Columns>
					<telerik:GridEditCommandColumn>
					</telerik:GridEditCommandColumn>
					<telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID" 
						SortExpression="ID" UniqueName="ID" ReadOnly = "true">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="Name" HeaderText="Name" 
						SortExpression="Name" UniqueName="Name">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="Description" HeaderText="Description" 
						SortExpression="Description" UniqueName="Description">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="Model" HeaderText="Model" SortExpression="Model" 
						UniqueName="Model">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="RegistrationNumber" HeaderText="RegistrationNumber" 
						SortExpression="RegistrationNumber" UniqueName="RegistrationNumber">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="Color" HeaderText="Color" 
						SortExpression="Color" UniqueName="Color">
					</telerik:GridBoundColumn>
					<telerik:GridButtonColumn ConfirmText="Delete this entity?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                        UniqueName="DeleteColumn">
          </telerik:GridButtonColumn>
					
				</Columns>
				<EditFormSettings>
					<EditColumn UniqueName="EditCommandColumn1">
					</EditColumn>
				</EditFormSettings>
			</MasterTableView>
			<FilterMenu>
				<CollapseAnimation Duration="200" Type="OutQuint" />
			</FilterMenu>
		</telerik:RadGrid>
		<asp:ObjectDataSource ID="CarDS" runat="server" 
			DataObjectTypeName="Dzzzr.CarInfo" DeleteMethod="DeleteCar" 
			InsertMethod="InsertCar" SelectMethod="GetCarList" 
			TypeName="Dzzzr.CarController" UpdateMethod="UpdateCar" 
			OldValuesParameterFormatString="original_{0}">
			<SelectParameters>
				<asp:Parameter DefaultValue="1" Name="teamID" Type="Int32" />
			</SelectParameters>

		</asp:ObjectDataSource>
	</telerik:RadAjaxPanel>
</asp:Content>
